package com.itheima.web.service.impl.oms;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itheima.service.oms.IOmsOrderSettingService;
import com.itheima.vo.oms.OmsOrderSetting;
import com.itheima.web.mapper.oms.OmsOrderMapper;
import com.itheima.web.mapper.oms.OmsOrderSettingMapper;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * <p>
 * 订单设置表 服务实现类
 * </p>
 *
 * @author 王志斌
 * @since 2022-07-06
 */
@DubboService
public class OmsOrderSettingServiceImpl extends ServiceImpl<OmsOrderSettingMapper, OmsOrderSetting> implements IOmsOrderSettingService {
    @Autowired
    private OmsOrderSettingMapper omsOrderSettingMapper;
    @Autowired
    private OmsOrderMapper omsOrderMapper;

    @Override
    public Integer update(Integer id, OmsOrderSetting orderSetting) {
        orderSetting.setId(id.longValue());
        return omsOrderSettingMapper.updateById(orderSetting);
    }

    @Override
    public OmsOrderSetting findById(Integer id) {
        return omsOrderSettingMapper.selectById(id);
    }
}
